from django.forms import ModelForm
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
from django import forms
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.files.storage import FileSystemStorage
from l2ldjango.apps.mailmanagement.models import *


class SendMail(ModelForm):
    class Meta:
        model=mail
        fields = ('mail_to','mail_subject','mail_details')
        #exclude=('mail_from','mail_send_date')

class ContactForm(forms.Form):
    Name = forms.CharField(max_length=100,required=True,widget=forms.TextInput(attrs={'class':'text-box'}))
    Email=forms.EmailField(required=True,widget=forms.TextInput(attrs={'class':'text-box'}))
    Company = forms.CharField(max_length=250,required=False,widget=forms.TextInput(attrs={'class':'text-box'}))
    #Country = forms.CharField(max_length=100,required=True,widget=forms.TextInput(attrs={'class':'text-box'}))
    #Country = forms.ModelChoiceField(label='Country',required=False,queryset=country.objects.all())
    Region = forms.CharField(max_length=100,required=False,widget=forms.TextInput(attrs={'class':'text-box'}))
    #Message=forms.TextField(required=True)
    Message = forms.CharField ( widget=forms.widgets.Textarea(attrs={'class':'message-box'}) )
